import React from 'react';
import { getEcCom,getLabel } from '../../util/convert';

class ReqNoRight extends React.Component {
    componentDidMount() {
        document.title = getLabel(504627,'无权限');
    }
    render() {
        const { WeaAlertPage } = getEcCom();
        const paddingTop = (jQuery(window).height()-420)/2;
        const { location = {} } = this.props;
        const { query = {} } = location;
        let msg = getLabel(2012,'对不起，您暂时没有权限！');
        if(query.isSecNoRight == '1'){
            msg = getLabel(501082,'对不起，您的人员密级不足以查看该内容');
        }else if(query.isDelete && query.isDelete != 'undefined'){
            msg = getLabel(501606,'对不起，该流程已删除');
        }else if(query.isTest && query.isTest != 'undefined'){
            msg = getLabel(522931,'当前流程为测试状态，暂无法显示！');
        }
        return (
            <WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@1j4q0p`} iconSize={200} style={{paddingTop:paddingTop}}>
                <div style={{fontSize: "16px", color:"#FFBB0E"}}>{ msg } </div>
            </WeaAlertPage>
        )
    }
}

export default ReqNoRight
